package com.dxdemo.dx2;

import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;

public class DX2Module extends ReactContextBaseJavaModule {
    public DX2Module(ReactApplicationContext reactContext) {
        super(reactContext);
    }

    @Override
    public String getName() {
        return "DX2Dialog";
    }

    /**
     * 打开启动屏
     */
    @ReactMethod
    public void show() {
        Dxdialog.show(getCurrentActivity());
    }

    /**
     * 关闭启动屏
     */
    @ReactMethod
    public void hide() {
        Dxdialog.hide(getCurrentActivity());
    }
}